type parsenode = PTimesNode of int list
               | PPlusNode of int list
               | PVarNode of int * int
               | PConstNode of float
;;

(*
let parsenode_to_string = function
  | PTimesNode(s, l) -> s ^ " = " ^ String.concat " * " l
  | PPlusNode(s, l) -> s ^ " = " ^ String.concat " + " l
  | PWPlusNode(s, l) -> 
    let conv (w,c) = Printf.sprintf "%g %s" w c in 
    s ^ " = " ^ String.concat " + " (List.map conv l)
  | PSplitNode(s, l) ->
    let conv (w,v,c) = Printf.sprintf "%g v%d_0 %s" w v c in 
    s ^ " = " ^ String.concat " + " (List.map conv l)
  | PDistNode(s, l) -> 
    let conv (w,v) = Printf.sprintf "%g v%d_0" w v in 
    s ^ " = " ^ String.concat " + " (List.map conv l)
    *)
